﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AnalizadorCsv.Clases
{
    public enum Fuente
    {
        ZIPCODE,
        CONNECTION,
        CONTACT,
        CONTACT_ORGANIZATION,
        LOCATION,
        LOCATION_ORG,
        OCCURRENCE,
        OPPORTUNITY_OCCURRENCE,
        ORGANIZATION,
        VOLUNTEER_EVENT,
        VOLUNTEER_OPPORTUNITY,
        VOLUNTEER_TEAM,
        VOLUNTEER_TEAM_MEMBER,
        NONE
    }
    public static class verificar
    {
        public static Fuente obtenerfuente(String archivo)
        {
            System.Resources.ResourceManager rm = new System.Resources.ResourceManager("Files", System.Reflection.Assembly.GetExecutingAssembly());
            String titulo = rm.GetString(acomodarNombreArchivo(archivo));
            Fuente val = (Fuente)Enum.Parse(typeof(Fuente),titulo);
            return val;
        }
        public static String acomodarNombreArchivo(String archivo)
        {
            String aux = archivo.Replace(".","_");
            return aux;
        }
        public static String[] obtenerArchivosComunes()
        {
            String[] listado = {"zipcodes.csv",
                               "organization.csv",
                               "contact.csv",
                               "contact_organization.csv",
                               "location.csv",
                               "location_org.csv",
                               "volunteer_event.csv",
                               "volunteer_team.csv",
                               "volunteer_team_member.csv",
                               "volunteer_opportunity.csv",
                               "ocurrence.csv",
                               "connection.csv",
                               "opportunity_occurrence.csv"};
            return listado;
        }
        public static String[] atributosZipCode()
        {
            String[] listado = { 
                                 "ZipCode", "Import ID", "PrimaryRecord", "Population", "HouseholdsPerZipCode",
                                 "WhitePopulation", "BlackPopulation", "HispanicPopulation", "AsianPopulation",
                                 "HawaiianPopulation", "IndianPopulation", "OtherPopulation", "MalePopulation",
                                 "FemalePopulation", "PersonsPerHousehold", "AverageHouseValue", "IncomePerHousehold",
                                 "Latitude", "Longitude", "Elevation", "State", "StateFullName", "CityType",
                                 "CityAliasAbbreviation", "AreaCode", "City", "CityAliasName", "County",
                                 "CountyFIPS", "StateFIPS", "TimeZone", "DayLightSaving", "MSA",
                                 "PMSA", "CSA", "CBSA", "CBSA_Div", "CBSAType",	"CBSAName",	"MSAName",
                                 "PMSAName", "Region", "Division", "MailingName", "PreferredLastLineKey",
                                 "ClassificationCode", "MultiCounty", "CSAName", "CBSA_Div_Name", "CityStateKey",
                                 "CityAliasCode", "CityMixedCase", "CityAliasMixedCase", "StateANSI", "CountyANSI",
                                 "FacilityCode", "CityDeliveryIndicator", "CarrierRouteRateSortation", "FinanceNumber",
                                 "UniqueZIPName"};
            Console.WriteLine("Total Zip Code "+listado.Length);
            return listado;
        }
        public static String[] atributosOrganization()
        {
            String[] listado = {"Organization Import ID", "Organization Name", "Also Known As",
                                   "Organization Type",	"Status", "Shipping Street", "Shipping City",
                                   "Shipping State/Province", "Shipping Zip/Postal Code", "Billing Street",
                                   "Billing City", "Billing State/Province", "Billing Zip/Postal Code",
                                   "Impact Area", "Organization Record Type", "Primary Address?",
                                   "Website", "Mission Statement", "Age Groups Served",
                                   "Genders Served", "Organization Phone", "Organization Fax",
                                   "Populations Served", "Volunteer Coordinator Email", "Volunteer Coordinator Name",
                                   "Federal EIN", "Address Visibility", "created date", "last modified date",
                                   "last modified by"};
            return listado;
        }
        public static String[] atributosContact()
        {
            String[] listado = {"Contact Import ID", "First Name", "Middle Name", "Last Name",
                                   "Registration Status", "Volunteer Type", "Birthdate", 
                                   "Gender", "Ethnicity/Race", "Disabled Person", "Target Population",
                                   "Education Level", "Employment Status", "Availability", "Communication Preferences",
                                   "Home Street", "Home City", "Home State/Province", "Home Zip/Postal Code",
                                   "Business Street", "Business City", "Business State/Province",
                                   "Business Zip/Postal Code", "Email", "Business Phone", "Mobile Phone",
                                   "Home Phone", "Other Phone", "Interests", "Accepts Invitations", 
                                   "Max Distance for Invitations", "Skill Profile Completed",
                                   "Organization Name", "Primary Phone?", "Primary Address?",
                                   "Salutation", "Username", "Record Type ID", "Contact Type",
                                   "Title", "LastModifiedDateSkillRating", "created date",
                                   "last modified date", "last modified by"};
            return listado;
        }
        public static String[] atributosContactOrganization()
        {
            String[] listado = { "organization Import ID",
                                   "Contact Import ID"
};
            return listado;
        }
        public static String[] atributosLocation()
        {
            String[] listado = { "Location Import ID", "Location Name", "Street", "City",
                                   "State/Province",	"Zip/Postal Code", "Zip Code",
                                   "Country", "Google Map URL", "Latitude", "Longitude",
                                   "Special Directions", "created date", "last modified date", "last modified by"
                                };
            return listado;
        }
        public static String[] atributosLocationOrg()
        {
            String[] listado = {"Location Import ID", "Organization Import ID" };
            return listado;
        }
        public static String[] atributosVolunteerEvent()
        {
            String[] listado = { "Volunteer Event Import ID", "Description", "Start Date",	"End Date",
                                   "Volunteer Event Name", "created date", "last modified date",
                                   "last modified by"};
            return listado;
        }
        public static String[] atributosVolunteerTeam()
        {
            String[] listado = { "Volunteer Team Import ID", "Description", "Status",
                                   "Volunteer Team Name", "Organization", "Duration",
                                   "Visibility", "created date", "last modified date",
                                   "last modified by"  };
            return listado;
        }
        public static String[] atributosVolunteerTeamMember()
        {
            String[] listado = { "Volunteer Team Member Import ID", "Captain", "Contact Import ID",
                                   "Status", "Volunteer Team Import ID" };
            return listado;
        }
        public static String[] atributosVolunteerOpportunity()
        {
            String[] listado = { "Volunteer Opportunity Import ID", "Volunteer Opportunity Name",
                                   "Description", "Type", "Managed By", "Hosting Organization", "National Service Events",
                                   "HON Signature Initiatives", "Organization Served", "Schedule Type", "Status",
                                   "Registration Type", "Primary Impact Area", "Secondary Impact Area",
                                   "Registration Start Date", "Minimum Age (w/o adult)", "Start Date", "End Date",
                                   "Populations Served", "Suitable for Groups", "Court_Ordered_Allowed", 
                                   "Volunteer Coordinator Name", "Volunteer Coordinator Email", "Age Groups Served",
                                   "Genders Served", "Managing Organization", "Maximum Attendance", "Minimum Attendance",
                                   "Registration Deadline", "Skilled Volunteer Required", "Duration",
                                   "Skill Category", "Total Occurrences", "created date", "last modified date",
                                   "last modified by", "Minimum Age w/ Adult", "Opportunity Coordinator" };
            return listado;
        }
        public static String[] atributosOccurrence()
        {
            String[] listado = { "Occurrence Import ID", "Start Date & Time", "End Date & Time", 
                                   "Days & Times Needed", "Status", "Volunteer Opportunity Import ID",
                                   "Location Import ID", "Registration Start Date", "Volunteer Coordinator Name",
                                   "Volunteer Coordinator Email", "Maximum Attendance", "Minimum Attendance",
                                   "Registration Deadline", "Schedule Type", "created date", "last modified date",
                                   "last modified by", "Opportunity Coordinator"
                               };
            return listado;
        }
        public static String[] atributosConnection()
        {
            String[] listado = { "Connection Import ID",
                                   "Volunteer Opportunity Import ID", "Occurrence Import ID",
                                   "Contact Import ID", "Role", "Status", "Start Date & Time",
                                   "End Date & Time", "Hours Served", "Attendance Status",
                                   "Team Member", "Guest Volunteers", "Rating", "created date",
                                   "last modified date", "last modified by"};
            return listado;
        }
        public static String[] atributosOpportunityOccurrence()
        {
            String[] listado = { "Volunteer Opportunity Import ID", "Total Occurrences" };
            return listado;
        }
    }
}
